package wypozyczalnia.dao;

import java.util.List;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import wypozyczalnia.domain.Photo;

@Repository
public class PhotoDao extends GenericDao<Photo> {

	@Autowired
	public PhotoDao(SessionFactory sf) {
		super(Photo.class, sf);
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<Photo> getAll() {
		return getHibernateTemplate().find("from Photo");
	}
}
